<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE Unsafe #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE CPP, NoImplicitPrelude #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# OPTIONS_GHC -Wno-missing-signatures #-}</span><span>
</span><span id="line-4"></span><span class="hs-pragma">{-# OPTIONS_HADDOCK not-home #-}</span><span>
</span><span id="line-5"></span><span>
</span><span id="line-6"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- Module      :  GHC.Conc</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- Copyright   :  (c) The University of Glasgow, 1994-2002</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- License     :  see libraries/base/LICENSE</span><span>
</span><span id="line-11"></span><span class="hs-comment">--</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- Maintainer  :  cvs-ghc@haskell.org</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- Stability   :  internal</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- Portability :  non-portable (GHC extensions)</span><span>
</span><span id="line-15"></span><span class="hs-comment">--</span><span>
</span><span id="line-16"></span><span class="hs-comment">-- Basic concurrency stuff.</span><span>
</span><span id="line-17"></span><span class="hs-comment">--</span><span>
</span><span id="line-18"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-19"></span><span>
</span><span id="line-20"></span><span class="hs-comment">-- No: #hide, because bits of this module are exposed by the stm package.</span><span>
</span><span id="line-21"></span><span class="hs-comment">-- However, we don't want this module to be the home location for the</span><span>
</span><span id="line-22"></span><span class="hs-comment">-- bits it exports, we'd rather have Control.Concurrent and the other</span><span>
</span><span id="line-23"></span><span class="hs-comment">-- higher level modules be the home.  Hence: #not-home</span><span>
</span><span id="line-24"></span><span>
</span><span id="line-25"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Conc</span><span>
</span><span id="line-26"></span><span>        </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#ThreadId"><span class="hs-identifier">ThreadId</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-27"></span><span>
</span><span id="line-28"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Forking and suchlike</span></span><span>
</span><span id="line-29"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#forkIO"><span class="hs-identifier">forkIO</span></a></span><span>
</span><span id="line-30"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#forkIOWithUnmask"><span class="hs-identifier">forkIOWithUnmask</span></a></span><span>
</span><span id="line-31"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#forkOn"><span class="hs-identifier">forkOn</span></a></span><span>
</span><span id="line-32"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#forkOnWithUnmask"><span class="hs-identifier">forkOnWithUnmask</span></a></span><span>
</span><span id="line-33"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#numCapabilities"><span class="hs-identifier">numCapabilities</span></a></span><span>
</span><span id="line-34"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#getNumCapabilities"><span class="hs-identifier">getNumCapabilities</span></a></span><span>
</span><span id="line-35"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#setNumCapabilities"><span class="hs-identifier">setNumCapabilities</span></a></span><span>
</span><span id="line-36"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#getNumProcessors"><span class="hs-identifier">getNumProcessors</span></a></span><span>
</span><span id="line-37"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#numSparks"><span class="hs-identifier">numSparks</span></a></span><span>
</span><span id="line-38"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#childHandler"><span class="hs-identifier">childHandler</span></a></span><span>
</span><span id="line-39"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#myThreadId"><span class="hs-identifier">myThreadId</span></a></span><span>
</span><span id="line-40"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#killThread"><span class="hs-identifier">killThread</span></a></span><span>
</span><span id="line-41"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#throwTo"><span class="hs-identifier">throwTo</span></a></span><span>
</span><span id="line-42"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#par"><span class="hs-identifier">par</span></a></span><span>
</span><span id="line-43"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#pseq"><span class="hs-identifier">pseq</span></a></span><span>
</span><span id="line-44"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#runSparks"><span class="hs-identifier">runSparks</span></a></span><span>
</span><span id="line-45"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#yield"><span class="hs-identifier">yield</span></a></span><span>
</span><span id="line-46"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#labelThread"><span class="hs-identifier">labelThread</span></a></span><span>
</span><span id="line-47"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#mkWeakThreadId"><span class="hs-identifier">mkWeakThreadId</span></a></span><span>
</span><span id="line-48"></span><span>
</span><span id="line-49"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#ThreadStatus"><span class="hs-identifier">ThreadStatus</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#BlockReason"><span class="hs-identifier">BlockReason</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-50"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#threadStatus"><span class="hs-identifier">threadStatus</span></a></span><span>
</span><span id="line-51"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#threadCapability"><span class="hs-identifier">threadCapability</span></a></span><span>
</span><span id="line-52"></span><span>
</span><span id="line-53"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#newStablePtrPrimMVar"><span class="hs-identifier">newStablePtrPrimMVar</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#PrimMVar"><span class="hs-identifier">PrimMVar</span></a></span><span>
</span><span id="line-54"></span><span>
</span><span id="line-55"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Waiting</span></span><span>
</span><span id="line-56"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.IO.html#threadDelay"><span class="hs-identifier">threadDelay</span></a></span><span>
</span><span id="line-57"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.IO.html#registerDelay"><span class="hs-identifier">registerDelay</span></a></span><span>
</span><span id="line-58"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.IO.html#threadWaitRead"><span class="hs-identifier">threadWaitRead</span></a></span><span>
</span><span id="line-59"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.IO.html#threadWaitWrite"><span class="hs-identifier">threadWaitWrite</span></a></span><span>
</span><span id="line-60"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.IO.html#threadWaitReadSTM"><span class="hs-identifier">threadWaitReadSTM</span></a></span><span>
</span><span id="line-61"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.IO.html#threadWaitWriteSTM"><span class="hs-identifier">threadWaitWriteSTM</span></a></span><span>
</span><span id="line-62"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.IO.html#closeFdWith"><span class="hs-identifier">closeFdWith</span></a></span><span>
</span><span id="line-63"></span><span>
</span><span id="line-64"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Allocation counter and limit</span></span><span>
</span><span id="line-65"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#setAllocationCounter"><span class="hs-identifier">setAllocationCounter</span></a></span><span>
</span><span id="line-66"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#getAllocationCounter"><span class="hs-identifier">getAllocationCounter</span></a></span><span>
</span><span id="line-67"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#enableAllocationLimit"><span class="hs-identifier">enableAllocationLimit</span></a></span><span>
</span><span id="line-68"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#disableAllocationLimit"><span class="hs-identifier">disableAllocationLimit</span></a></span><span>
</span><span id="line-69"></span><span>
</span><span id="line-70"></span><span>        </span><span class="annot"><span class="hs-comment">-- * TVars</span></span><span>
</span><span id="line-71"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#STM"><span class="hs-identifier">STM</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-72"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#atomically"><span class="hs-identifier">atomically</span></a></span><span>
</span><span id="line-73"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#retry"><span class="hs-identifier">retry</span></a></span><span>
</span><span id="line-74"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#orElse"><span class="hs-identifier">orElse</span></a></span><span>
</span><span id="line-75"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#throwSTM"><span class="hs-identifier">throwSTM</span></a></span><span>
</span><span id="line-76"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#catchSTM"><span class="hs-identifier">catchSTM</span></a></span><span>
</span><span id="line-77"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#TVar"><span class="hs-identifier">TVar</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-78"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#newTVar"><span class="hs-identifier">newTVar</span></a></span><span>
</span><span id="line-79"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#newTVarIO"><span class="hs-identifier">newTVarIO</span></a></span><span>
</span><span id="line-80"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#readTVar"><span class="hs-identifier">readTVar</span></a></span><span>
</span><span id="line-81"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#readTVarIO"><span class="hs-identifier">readTVarIO</span></a></span><span>
</span><span id="line-82"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#writeTVar"><span class="hs-identifier">writeTVar</span></a></span><span>
</span><span id="line-83"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#unsafeIOToSTM"><span class="hs-identifier">unsafeIOToSTM</span></a></span><span>
</span><span id="line-84"></span><span>
</span><span id="line-85"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Miscellaneous</span></span><span>
</span><span id="line-86"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#withMVar"><span class="hs-identifier">withMVar</span></a></span><span class="hs-cpp">
#if defined(mingw32_HOST_OS)
</span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Windows.html#asyncRead"><span class="hs-identifier">asyncRead</span></a></span><span>
</span><span id="line-89"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Windows.html#asyncWrite"><span class="hs-identifier">asyncWrite</span></a></span><span>
</span><span id="line-90"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Windows.html#asyncDoProc"><span class="hs-identifier">asyncDoProc</span></a></span><span>
</span><span id="line-91"></span><span>
</span><span id="line-92"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Windows.html#asyncReadBA"><span class="hs-identifier">asyncReadBA</span></a></span><span>
</span><span id="line-93"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Windows.html#asyncWriteBA"><span class="hs-identifier">asyncWriteBA</span></a></span><span class="hs-cpp">
#endif
</span><span class="hs-cpp">
#if !defined(mingw32_HOST_OS)
</span><span>        </span><span class="hs-special">,</span><span> </span><span class="hs-identifier">Signal</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">HandlerFun</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">setHandler</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">runHandlers</span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-100"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.IO.html#ensureIOManagerIsRunning"><span class="hs-identifier">ensureIOManagerIsRunning</span></a></span><span>
</span><span id="line-101"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.IO.html#ioManagerCapabilitiesChanged"><span class="hs-identifier">ioManagerCapabilitiesChanged</span></a></span><span class="hs-cpp">

#if defined(mingw32_HOST_OS)
</span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.Windows.ConsoleEvent.html#ConsoleEvent"><span class="hs-identifier">ConsoleEvent</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-105"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.Windows.ConsoleEvent.html#win32ConsoleHandler"><span class="hs-identifier">win32ConsoleHandler</span></a></span><span>
</span><span id="line-106"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Event.Windows.ConsoleEvent.html#toWin32ConsoleEvent"><span class="hs-identifier">toWin32ConsoleEvent</span></a></span><span class="hs-cpp">
#endif
</span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#setUncaughtExceptionHandler"><span class="hs-identifier">setUncaughtExceptionHandler</span></a></span><span>
</span><span id="line-109"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#getUncaughtExceptionHandler"><span class="hs-identifier">getUncaughtExceptionHandler</span></a></span><span>
</span><span id="line-110"></span><span>
</span><span id="line-111"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#reportError"><span class="hs-identifier">reportError</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#reportStackOverflow"><span class="hs-identifier">reportStackOverflow</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html#reportHeapOverflow"><span class="hs-identifier">reportHeapOverflow</span></a></span><span>
</span><span id="line-112"></span><span>        </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-113"></span><span>
</span><span id="line-114"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Conc.IO.html"><span class="hs-identifier">GHC.Conc.IO</span></a></span><span>
</span><span id="line-115"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Conc.Sync.html"><span class="hs-identifier">GHC.Conc.Sync</span></a></span><span class="hs-cpp">

#if !defined(mingw32_HOST_OS)
</span><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">GHC.Conc.Signal</span><span class="hs-cpp">
#endif
</span></pre></body></html>